using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LinearReferencingTools
{
    /// <summary>
    /// <para>Dissolve Route Events</para>
    /// <para>Removes redundant information from event tables or separates event tables having more than one descriptive attribute into individual tables.</para>
    /// <para>从事件表中删除冗余信息，或将具有多个描述性属性的事件表分隔到单个表中。</para>
    /// </summary>    
    [DisplayName("Dissolve Route Events")]
    public class DissolveRouteEvents : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DissolveRouteEvents()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_events">
        /// <para>Input Event Table</para>
        /// <para>The table whose rows will be aggregated.</para>
        /// <para>将聚合其行的表。</para>
        /// </param>
        /// <param name="_in_event_properties">
        /// <para>Event Table Properties</para>
        /// <para><xdoc>
        ///   <para>Parameter consisting of the route location fields and the type of events in the input event table.</para>
        ///   <bulletList>
        ///     <bullet_item>Route Identifier Field—The field containing values that indicate the route on which each event is located. This field can be numeric or character.</bullet_item><para/>
        ///     <bullet_item>Event Type—The type of events in the input event table (POINT or LINE).
        ///     <bulletList>
        ///       <bullet_item>POINT—Point events occur at a precise location along a route. Only a from-measure field must be specified.  </bullet_item><para/>
        ///       <bullet_item>LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is POINT or LINE. Note when the Event Type is POINT, the label for this parameter becomes Measure Field.</bullet_item><para/>
        ///     <bullet_item>To-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is LINE.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>由路径位置字段和输入事件表中的事件类型组成的参数。</para>
        ///   <bulletList>
        ///     <bullet_item>路径标识符字段 - 包含指示每个事件所在路径的值的字段。此字段可以是数字或字符。</bullet_item><para/>
        /// <bullet_item>事件类型 - 输入事件表中的事件类型（POINT 或 LINE）。
        ///     <bulletList>
        ///       <bullet_item>POINT - 点事件发生在沿路径的精确位置。只需指定 from-measure 字段。 </bullet_item><para/>
        ///       <bullet_item>LINE - 线事件定义路径的一部分。必须同时指定 from-measure 和 to-measure 字段。 </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure 字段 - 包含测量值的字段。此字段必须为数值，并且在事件类型为 POINT 或 LINE 时为必填字段。注意：当“事件类型”为“点”时，此参数的标签将变为“测量字段”。</bullet_item><para/>
        ///     <bullet_item>待测量字段 （To-Measure Field） - 包含测量值的字段。此字段必须为数值，当事件类型为 LINE 时为必填字段。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_dissolve_field">
        /// <para>Dissolve Fields</para>
        /// <para>The field(s) used to aggregate rows.</para>
        /// <para>用于聚合行的字段。</para>
        /// </param>
        /// <param name="_out_table">
        /// <para>Output Event Table</para>
        /// <para>The table to be created.</para>
        /// <para>要创建的表。</para>
        /// </param>
        /// <param name="_out_event_properties">
        /// <para>Output Event Table Properties</para>
        /// <para><xdoc>
        ///   <para>Parameter consisting of the route location fields and the type of events that will be written to the output event table.</para>
        ///   <bulletList>
        ///     <bullet_item>Route Identifier Field—The field that will contain values that indicate the route on which each event is located.</bullet_item><para/>
        ///     <bullet_item>Event Type—The type of events the output event table will contain (POINT or LINE).
        ///     <bulletList>
        ///       <bullet_item>POINT—Point events occur at a precise location along a route. Only a single measure field must be specified.  </bullet_item><para/>
        ///       <bullet_item>LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure Field—A field that will contain measure values. Required when the event type is POINT or LINE. Note when the Event Type is POINT, the label for this parameter becomes Measure Field.</bullet_item><para/>
        ///     <bullet_item>To-Measure Field—A field that will contain measure values. Required when the event type is LINE.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>由路径位置字段和将写入输出事件表的事件类型组成的参数。</para>
        ///   <bulletList>
        ///     <bullet_item>路径标识符字段 - 包含指示每个事件所在路径的值的字段。</bullet_item><para/>
        /// <bullet_item>事件类型 - 输出事件表将包含的事件类型（POINT 或 LINE）。
        ///     <bulletList>
        ///       <bullet_item>POINT - 点事件发生在沿路径的精确位置。只需指定一个度量字段。 </bullet_item><para/>
        ///       <bullet_item>LINE - 线事件定义路径的一部分。必须同时指定 from-measure 和 to-measure 字段。 </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure 字段 - 包含测量值的字段。当事件类型为 POINT 或 LINE 时为必填项。注意：当“事件类型”为“点”时，此参数的标签将变为“测量字段”。</bullet_item><para/>
        ///     <bullet_item>待测量字段 （To-Measure Field） - 将包含测量值的字段。当事件类型为LINE时为必填项。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public DissolveRouteEvents(object _in_events, object _in_event_properties, List<object> _dissolve_field, object _out_table, object _out_event_properties)
        {
            this._in_events = _in_events;
            this._in_event_properties = _in_event_properties;
            this._dissolve_field = _dissolve_field;
            this._out_table = _out_table;
            this._out_event_properties = _out_event_properties;
        }
        public override string ToolboxName => "Linear Referencing Tools";

        public override string ToolName => "Dissolve Route Events";

        public override string CallName => "lr.DissolveRouteEvents";

        public override List<string> AcceptEnvironments => ["configKeyword", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_events, _in_event_properties, _dissolve_field, _out_table, _out_event_properties, _dissolve_type.GetGPValue(), _build_index.GetGPValue()];

        /// <summary>
        /// <para>Input Event Table</para>
        /// <para>The table whose rows will be aggregated.</para>
        /// <para>将聚合其行的表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Event Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_events { get; set; }


        /// <summary>
        /// <para>Event Table Properties</para>
        /// <para><xdoc>
        ///   <para>Parameter consisting of the route location fields and the type of events in the input event table.</para>
        ///   <bulletList>
        ///     <bullet_item>Route Identifier Field—The field containing values that indicate the route on which each event is located. This field can be numeric or character.</bullet_item><para/>
        ///     <bullet_item>Event Type—The type of events in the input event table (POINT or LINE).
        ///     <bulletList>
        ///       <bullet_item>POINT—Point events occur at a precise location along a route. Only a from-measure field must be specified.  </bullet_item><para/>
        ///       <bullet_item>LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is POINT or LINE. Note when the Event Type is POINT, the label for this parameter becomes Measure Field.</bullet_item><para/>
        ///     <bullet_item>To-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is LINE.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>由路径位置字段和输入事件表中的事件类型组成的参数。</para>
        ///   <bulletList>
        ///     <bullet_item>路径标识符字段 - 包含指示每个事件所在路径的值的字段。此字段可以是数字或字符。</bullet_item><para/>
        /// <bullet_item>事件类型 - 输入事件表中的事件类型（POINT 或 LINE）。
        ///     <bulletList>
        ///       <bullet_item>POINT - 点事件发生在沿路径的精确位置。只需指定 from-measure 字段。 </bullet_item><para/>
        ///       <bullet_item>LINE - 线事件定义路径的一部分。必须同时指定 from-measure 和 to-measure 字段。 </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure 字段 - 包含测量值的字段。此字段必须为数值，并且在事件类型为 POINT 或 LINE 时为必填字段。注意：当“事件类型”为“点”时，此参数的标签将变为“测量字段”。</bullet_item><para/>
        ///     <bullet_item>待测量字段 （To-Measure Field） - 包含测量值的字段。此字段必须为数值，当事件类型为 LINE 时为必填字段。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Event Table Properties")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_event_properties { get; set; }


        /// <summary>
        /// <para>Dissolve Fields</para>
        /// <para>The field(s) used to aggregate rows.</para>
        /// <para>用于聚合行的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dissolve Fields")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _dissolve_field { get; set; }


        /// <summary>
        /// <para>Output Event Table</para>
        /// <para>The table to be created.</para>
        /// <para>要创建的表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Event Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_table { get; set; }


        /// <summary>
        /// <para>Output Event Table Properties</para>
        /// <para><xdoc>
        ///   <para>Parameter consisting of the route location fields and the type of events that will be written to the output event table.</para>
        ///   <bulletList>
        ///     <bullet_item>Route Identifier Field—The field that will contain values that indicate the route on which each event is located.</bullet_item><para/>
        ///     <bullet_item>Event Type—The type of events the output event table will contain (POINT or LINE).
        ///     <bulletList>
        ///       <bullet_item>POINT—Point events occur at a precise location along a route. Only a single measure field must be specified.  </bullet_item><para/>
        ///       <bullet_item>LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure Field—A field that will contain measure values. Required when the event type is POINT or LINE. Note when the Event Type is POINT, the label for this parameter becomes Measure Field.</bullet_item><para/>
        ///     <bullet_item>To-Measure Field—A field that will contain measure values. Required when the event type is LINE.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>由路径位置字段和将写入输出事件表的事件类型组成的参数。</para>
        ///   <bulletList>
        ///     <bullet_item>路径标识符字段 - 包含指示每个事件所在路径的值的字段。</bullet_item><para/>
        /// <bullet_item>事件类型 - 输出事件表将包含的事件类型（POINT 或 LINE）。
        ///     <bulletList>
        ///       <bullet_item>POINT - 点事件发生在沿路径的精确位置。只需指定一个度量字段。 </bullet_item><para/>
        ///       <bullet_item>LINE - 线事件定义路径的一部分。必须同时指定 from-measure 和 to-measure 字段。 </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure 字段 - 包含测量值的字段。当事件类型为 POINT 或 LINE 时为必填项。注意：当“事件类型”为“点”时，此参数的标签将变为“测量字段”。</bullet_item><para/>
        ///     <bullet_item>待测量字段 （To-Measure Field） - 将包含测量值的字段。当事件类型为LINE时为必填项。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Event Table Properties")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_event_properties { get; set; }


        /// <summary>
        /// <para>Combine adjacent events only</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the input events will be concatenated or dissolved.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Events will be aggregated wherever there is measure overlap. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Events will be aggregated where the to-measure of one event matches the from-measure of the next event. This option is applicable only for line events.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是串联还是融合输入事件。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 只要存在度量重叠，事件就会聚合。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 如果一个事件的待测值与下一个事件的起始测度匹配，则将聚合事件。此选项仅适用于线路事件。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Combine adjacent events only")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _dissolve_type_value _dissolve_type { get; set; } = _dissolve_type_value._false;

        public enum _dissolve_type_value
        {
            /// <summary>
            /// <para>CONCATENATE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CONCATENATE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DISSOLVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DISSOLVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Build index</para>
        /// <para><xdoc>
        ///   <para>Specifies whether an attribute index will be created for the route identifier field that is written to the output event table.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Creates an attribute index. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Does not create an attribute index.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否为写入输出事件表的路由标识符字段创建属性索引。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 创建属性索引。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 （Unchecked） - 不创建属性索引。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Build index")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _build_index_value _build_index { get; set; } = _build_index_value._true;

        public enum _build_index_value
        {
            /// <summary>
            /// <para>INDEX</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INDEX")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_INDEX</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_INDEX")]
            [GPEnumValue("false")]
            _false,

        }

        public DissolveRouteEvents SetEnv(object configKeyword = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(configKeyword: configKeyword, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}